module CanCamel::Filters
  class CustomFilter
    attr_reader :name

    def initialize(name, lambda)
      @name, @lambda = name, lambda
    end

    def invoke!(**args)
      lambda.call(**args)
    end

    private

    attr_reader :lambda
  end
end
